import org.junit.Test;

public class HelloWorld {

	// java里面的main函数，入口函数
	public static void main(String[] args) {
		// 在控制台里面打印"HelloWorld"
		// syso  sout
		System.out.println("HelloWorld");
		
		//年龄是一个整数 age 23
		// int表示是一个整数类型，age这个变量就表示只能存放整数类型
		// 之所以叫变量任何整数类型的值都可以赋值给这个变量
		int age = 23;
		age = 18;
		System.out.println(age);
		int num1 = 3;
		int num2 = 5;
		int result = num1 + num2;
		System.out.println(result);
		
		// Type mismatch(不匹配): cannot convert(转换) from double to int
		// int num3 = 3.14;
		double d = 3.14;
		String str = "HelloWorld";
		String name = "张三";
		
		test();
	}
	
	private static void test() {
		// syst
		System.out.println("HelloWorld.test()");
		int num1 = 3;
		int num2 = 5;
		int result = num1 + num2;
	}

	@Test
	public void test1() {
		// systrace trace:跟踪，追踪
		System.out.println("HelloWorld.test1()");
		System.out.println("HelloWorld.test1()");
		int num1 = 3;
		int num2 = 5;
		int result = num1 + num2;
		System.out.println("相加结果：" + result);
		result = num1 - num2;
		System.out.println("相减结果：" + result);
		result = num1 * num2;
		System.out.println("相乘结果：" + result);
		result = num1 / num2;
		System.out.println("相除结果：" + result);
		result = num1 % num2;
		System.out.println("取余结果：" + result);
		
	}
	
	@Test
	public void test2() {
		// systrace trace:跟踪，追踪  
		System.out.println("HelloWorld.test2()");
	}
	
	@Test
	public void test3() {
		System.out.println("HelloWorld.test3()");
	}
	
}
